package com.dhl.fin.api.enums;

import lombok.Getter;

@Getter
public enum LendRecordStatusEnum {

    FINISHED("FINISHED", "已收回"),

    REPAYING("REPAYING", "借出中");

    private String code;

    private String name;

    LendRecordStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static LendRecordStatusEnum getLendRecordStatusEnum(String code) {
        for (LendRecordStatusEnum e : LendRecordStatusEnum.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }

}
